struct MUI_Command { char *mc_Name; char *mc_Template; LONG mc_Parameters; struct Hook *mc_Hook; LONG mc_Reserved[5]; };
You may specify any number of MUI_Command structures, but you must terminate your array with a NULL field.
When a command shows up an applications ARexx port, MUI parses the arguments according to the given template and calls the hook with the application object as hook object in a2 and a pointer to an array of longwords containing the parameters in a1.
The result code of your hook will be replied to ARexx as rc.
If you have some simple ARexx commands that just emulate some user action (e.g. clicking a button), you can use the magic cookie MC_TEMPLATE_ID for mc_Template and a return id value for mc_Parameters. In this case, MUI will do no argument parsing and instead simply return the specified id value on the next call to MUIM_Application_Input.
For more sophisticated possibilities in ARexx callback hooks, please refer to MUIA_Application_RexxMsg and MUIA_Application_RexxString.